<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>缩放页面</title>
    <style>
        body {
            margin: 0;
            padding: 0;
        }
        #body {
            position: fixed;
            top: 0;
            left: 0;
            width: 1366px;
            height: 768px;
            background: deepskyblue;
            transition: width 1s ease;
        }
    </style>
</head>
<body>
    <div id="body"></div>

    <script src="resetScreenSize.js"></script>
    <script>
    
    resetScreenSize('#body', 1366, 768)

    window.onresize = () => {
        console.log(1)
    }
    </script>
</body>
</html>